// import { createMemoryHistory, createRouter } from 'vue-router'
import { createRouter, createWebHashHistory } from 'vue-router'

import Index from '@/pages/index.vue'
import Login from '@/pages/Login/login.vue'
import NotFound from '@/pages/404/NotFound.vue'
// import Index from '../../src/pages/index.vue'
// import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs'

const routes = [
    {
        path: '/',
        component: Index,
        meta:{
            title:"后台首页"
        }
    },


    {
        path: "/login",
        component: Login,
        meta: {
            title: "登录页"
        }
    },


    // 404页面
    {   path: '/:pathMatch(.*)*',
        name: 'NotFound',
      component: NotFound },

]


const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router